﻿namespace DynaBoard
{
    using System;

    [IsRequired(false)]
    [MaxLength(32)]
    [RegexPattern("[^\x00-\x1f]{1,32}")]
    public class AuthorName : UserInputString 
    {
        public AuthorName(string name)
            : base(name, true)
        { }

        public static implicit operator String(AuthorName name)
        {
            return name.value;
        }

        public static implicit operator AuthorName(string name)
        {
            return new AuthorName(name);
        }
    }
}